package com.yun.service.Impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yun.dao.FileDao;
import com.yun.dao.ShareDao;

import com.yun.entity.Files;
import com.yun.entity.Share;
import com.yun.service.ShareService;


@Service
public class ShareServiceImpl implements ShareService {
	@Resource
	private ShareDao shareDao;
	@Resource
	private FileDao fileDao;
	@Override
	public List<Share> findFilesShareByUserId(int userId) {
		// TODO Auto-generated method stub
		return shareDao.getShareFilesList(userId);
	}
	@Override
	public Files select(int fileId) {
		// TODO Auto-generated method stub
		return fileDao.findFileByFileId(fileId);
	}
	@Override
	public int insertFileByFileId(Files files) {
		// TODO Auto-generated method stub
		return shareDao.insertFile(files);
	}
	@Override
	public List<Share> findShareList() {
		// TODO Auto-generated method stub
		System.out.println("???"+shareDao.findShareList());
		return shareDao.findShareList();
		
	}

	@Override
	public Share findFilesById(int fileId) {
		// TODO Auto-generated method stub
		return shareDao.findFilesById(fileId);
	}


}
